mutable struct PerfectBipartiteMatchingHungarianSolver <: PerfectBipartiteMatchingSolver 
  weights_matrix::Matrix{Float64}

  function PerfectBipartiteMatchingHungarianSolver()
    return new(Array{Float64}(0, 0))
  end
end

function build!(solver::PerfectBipartiteMatchingHungarianSolver, reward::Matrix{Distribution})
  n = size(reward, 1)
  solver.weights_matrix = zeros(n, n)
  nothing
end

function solve_linear(solver::PerfectBipartiteMatchingHungarianSolver, weights::Dict{Tuple{Int, Int}, Float64})
  fill!(solver.weights_matrix, 0.0)
  for (k, v) in weights
    solver.weights_matrix[k[1], k[2]] = v
  end
  solver.weights_matrix = maximum(solver.weights_matrix) .- solver.weights_matrix

  # assignment, _ = Hungarian.hungarian(solver.weights_matrix)
  # return collect(enumerate(assignment))

  matching = Hungarian.munkres!(solver.weights_matrix)
  # assignment = findn(matching' .== Hungarian.STAR)[1]
  # return collect(enumerate(assignment))
  return [ind2sub(matching, v) for v in find(matching .== Hungarian.STAR)]
end
